import os

directory = "./"

# 遍历所有文件
for root, dirs, files in os.walk(directory):
    # 删除特定目录（将不会继续遍历该目录）
    if ".git" in dirs:
        dirs[:] = [d for d in dirs if d != ".git"]
    for file in files:
        full_path = os.path.join(root, file)
        print(f"Found file: {full_path}")

# 遍历所有目录
for root, dirs, _ in os.walk(directory):
    # 删除特定目录（将不会继续遍历该目录）
    if ".git" in dirs:
        dirs.remove(".git")
    for dir_name in dirs:
        full_path = os.path.join(root, dir_name)
        print(f"Found directory: {full_path}")